<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{pcPurchaseReceiptBean.id}"/>
		<f:event type="preRenderView" listener="#{pcPurchaseReceiptBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Pc Purchase Receipt"/>

	<ui:define name="header">
		Pc Purchase Receipt
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty pcPurchaseReceiptBean.id}">
				Edit existing Pc Purchase Receipt
			</c:when>
			<c:otherwise>
				Create a new Pc Purchase Receipt
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptNo" value="Rcpt No:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptNo" required="true" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptNo}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptHrEmpByRcptReceiptByEmpNo" value="Hr Emp By Rcpt Receipt By Emp No:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{hrEmpBean.converter}" id="pcPurchaseReceiptBeanPcPurchaseReceiptHrEmpByRcptReceiptByEmpNo" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.hrEmpByRcptReceiptByEmpNo}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptHrEmpByRcptReceiptByEmpNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseReceiptStatus" value="Pc Purchase Receipt Status:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{pcPurchaseReceiptStatusBean.converter}" id="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseReceiptStatus" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.pcPurchaseReceiptStatus}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{pcPurchaseReceiptStatusBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseReceiptStatus" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseOrder" value="Pc Purchase Order:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{pcPurchaseOrderBean.converter}" id="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseOrder" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.pcPurchaseOrder}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{pcPurchaseOrderBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseOrder" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptHrEmpByRcptCreatedByEmpNo" value="Hr Emp By Rcpt Created By Emp No:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{hrEmpBean.converter}" id="pcPurchaseReceiptBeanPcPurchaseReceiptHrEmpByRcptCreatedByEmpNo" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.hrEmpByRcptCreatedByEmpNo}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptHrEmpByRcptCreatedByEmpNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptCode" value="Rcpt Code:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptCode" maxLength="50" required="true" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptCode}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDescr" value="Rcpt Descr:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDescr" maxLength="300" required="true" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptDescr}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDate" value="Rcpt Date:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDate" maxLength="10" required="true" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptRefDelCode" value="Rcpt Ref Del Code:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptRefDelCode" maxLength="50" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptRefDelCode}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptRefDelCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDelByName" value="Rcpt Del By Name:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDelByName" maxLength="200" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptDelByName}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptDelByName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptReceiptDtm" value="Rcpt Receipt Dtm:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptReceiptDtm" maxLength="19" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptReceiptDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptReceiptDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptCreatedDtm" value="Rcpt Created Dtm:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptCreatedDtm" maxLength="19" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptCreatedDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptCreatedDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptMemo" value="Rcpt Memo:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptMemo" maxLength="500" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptMemo}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptMemo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptStatusIncVat" value="Rcpt Status Inc Vat:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptStatusIncVat" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptStatusIncVat}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptStatusIncVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptVatPercVal" value="Rcpt Vat Perc Val:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptVatPercVal" required="true" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptVatPercVal}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptVatPercVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptVatVal" value="Rcpt Vat Val:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReceiptBeanPcPurchaseReceiptRcptVatVal" required="true" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.rcptVatVal}"/>
					<h:message for="pcPurchaseReceiptBeanPcPurchaseReceiptRcptVatVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseReceiptItems" value="Pc Purchase Receipt Items:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt.pcPurchaseReceiptItems}"/>
					<h:dataTable id="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseReceiptItems" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rcpt Qty"/>
							</f:facet>
							<h:link outcome="/pcPurchaseReceiptItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemRcptQty" value="#{_item.rcptQty}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="pcPurchaseReceiptItemBeanAddRcptQty" value="#{pcPurchaseReceiptItemBean.add.rcptQty}"/>
								<h:message for="pcPurchaseReceiptItemBeanAddRcptQty" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rcpt Ppu"/>
							</f:facet>
							<h:link outcome="/pcPurchaseReceiptItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemRcptPpu" value="#{_item.rcptPpu}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="pcPurchaseReceiptItemBeanAddRcptPpu" value="#{pcPurchaseReceiptItemBean.add.rcptPpu}"/>
								<h:message for="pcPurchaseReceiptItemBeanAddRcptPpu" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rcpt Vat Perc Val"/>
							</f:facet>
							<h:link outcome="/pcPurchaseReceiptItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemRcptVatPercVal" value="#{_item.rcptVatPercVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="pcPurchaseReceiptItemBeanAddRcptVatPercVal" value="#{pcPurchaseReceiptItemBean.add.rcptVatPercVal}"/>
								<h:message for="pcPurchaseReceiptItemBeanAddRcptVatPercVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rcpt Vat Val"/>
							</f:facet>
							<h:link outcome="/pcPurchaseReceiptItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemRcptVatVal" value="#{_item.rcptVatVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="pcPurchaseReceiptItemBeanAddRcptVatVal" value="#{pcPurchaseReceiptItemBean.add.rcptVatVal}"/>
								<h:message for="pcPurchaseReceiptItemBeanAddRcptVatVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rcpt Total Price Exc Vat"/>
							</f:facet>
							<h:link outcome="/pcPurchaseReceiptItem/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemRcptTotalPriceExcVat" value="#{_item.rcptTotalPriceExcVat}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="pcPurchaseReceiptItemBeanAddRcptTotalPriceExcVat" value="#{pcPurchaseReceiptItemBean.add.rcptTotalPriceExcVat}"/>
								<h:message for="pcPurchaseReceiptItemBeanAddRcptTotalPriceExcVat" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(pcPurchaseReceiptItemBean.added)}" id="pcPurchaseReceiptBeanPcPurchaseReceiptPcPurchaseReceiptItemsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{pcPurchaseReceiptItemBean.add.pcPurchaseReceipt}" value="#{pcPurchaseReceiptBean.pcPurchaseReceipt}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{pcPurchaseReceiptBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty pcPurchaseReceiptBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{pcPurchaseReceiptBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{pcPurchaseReceiptBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>